# -*- coding:utf-8 -*-

from twisted.internet.protocol import Factory
from my_protocols import *


def download(reactor):
    f = Factory()
    f.protocol = Download
    reactor.listenTCP(8001, f)


def upload(reactor):
    f = Factory()
    f.protocol = Upload
    reactor.listenTCP(8002, f)


def cmd(reactor):
    f = Factory()
    f.protocol = Command
    reactor.listenTCP(8003, f)


if __name__ == '__main__':
    from twisted.internet import reactor

    download(reactor)
    upload(reactor)
    cmd(reactor)
    reactor.run()
